package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DzXqjdMapper;
import com.ruoyi.system.domain.DzXqjd;
import com.ruoyi.system.service.IDzXqjdService;


import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.system.mapper.DzHuiyuanMapper;
import com.ruoyi.system.domain.DzHuiyuan;
import com.ruoyi.system.service.IDzHuiyuanService;

/**
 * 小区解读Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-09-07
 */
@Service
public class DzXqjdServiceImpl implements IDzXqjdService 
{
    @Autowired
    private DzXqjdMapper dzXqjdMapper;

    @Autowired
    private ISysRoleService sysRoleService;

    @Autowired
    private IDzHuiyuanService dzHuiyuanService;

    /**
     * 查询小区解读
     * 
     * @param jdId 小区解读主键
     * @return 小区解读
     */
    @Override
    public DzXqjd selectDzXqjdByJdId(Long jdId)
    {
        return dzXqjdMapper.selectDzXqjdByJdId(jdId);
    }

    /**
     * 查询小区解读列表
     * 
     * @param dzXqjd 小区解读
     * @return 小区解读
     */
    @Override
    @DataScope(deptAlias = "d", userAlias = "u")
    public List<DzXqjd> selectDzXqjdList(DzXqjd dzXqjd)
    {

        return dzXqjdMapper.selectDzXqjdList(dzXqjd);
    }

    @Override
    public List<DzXqjd> selectDzXqjdListWeb(DzXqjd dzXqjd)
    {
        return dzXqjdMapper.selectDzXqjdList(dzXqjd);
    }

    /**
     * 新增小区解读
     * 
     * @param dzXqjd 小区解读
     * @return 结果
     */
    @Override
    public int insertDzXqjd(DzXqjd dzXqjd)
    {
        dzXqjd.setCreateTime(DateUtils.getNowDate());
        return dzXqjdMapper.insertDzXqjd(dzXqjd);
    }

    /**
     * 修改小区解读
     * 
     * @param dzXqjd 小区解读
     * @return 结果
     */
    @Override
    public int updateDzXqjd(DzXqjd dzXqjd)
    {
        return dzXqjdMapper.updateDzXqjd(dzXqjd);
    }

    /**
     * 批量删除小区解读
     * 
     * @param jdIds 需要删除的小区解读主键
     * @return 结果
     */
    @Override
    public int deleteDzXqjdByJdIds(Long[] jdIds)
    {
        return dzXqjdMapper.deleteDzXqjdByJdIds(jdIds);
    }

    /**
     * 删除小区解读信息
     * 
     * @param jdId 小区解读主键
     * @return 结果
     */
    @Override
    public int deleteDzXqjdByJdId(Long jdId)
    {
        return dzXqjdMapper.deleteDzXqjdByJdId(jdId);
    }
}
